
#ifdef ASDFASDFADF
//#include <i86.h>
#include <stdio.h>

#include "keyboard.h"
#include "vga.h"

/* dont do this :) */
//#include "keyboard.c"
//#include "vga.c"



int main(int argc, char* argv[])
{
    int i, flags;
    char key;
    unsigned char* screen_buf = (unsigned char*)0xA0000;
    unsigned int x, y;

    set_vga_mode(0x0013);

    screen_buf[0] = 10;
    screen_buf[1] = 10;


    
    // initialze screen buffer 
        for ( x = 0; x < 320; x++ )    {
        for ( y = 0; y < 200; y++) {
            screen_buf[y*320 +x] = y%256;
        }
      } 
    
    for (i = 0; i != -1; i++) {
        flags = poll_keyboard(&key);

        if ( !flags ) {
            printf("key pressed: %c\n", key);

            if ( key == 'q') {
                goto main_loop_done;
            }
        }
        else {
            //printf("no key pressed\n");
        }

        }

 main_loop_done:
    set_vga_mode(0x0003);
        
    return 0;
}

#endif

